/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entity;

import java.io.Serializable;
import java.util.ArrayList;

/**
 *
 * @author DungTV
 */
public class Order implements Serializable{
    private int orderID;
    private int userID;
    private String personName;
    private String phone;
    private String address;
    private String note;
    private long totalProduct;
    private long totalPrice;
    private boolean status ;
    ArrayList<OrderDetail> listOrderDetail;


    public Order() {
        this.listOrderDetail = new ArrayList<OrderDetail>();
    }    

    public Order(int orderID, int userID, String personName, String phone, String address, String note, long totalProduct, long totalPrice, boolean status) {
        this.orderID = orderID;
        this.userID = userID;
        this.personName = personName;
        this.phone = phone;
        this.address = address;
        this.note = note;
        this.totalProduct = totalProduct;
        this.totalPrice = totalPrice;
        this.status = status;
        listOrderDetail = new ArrayList<OrderDetail>();
    }

    public void addOD(OrderDetail o){
        this.listOrderDetail.add(o);
    }

    public boolean removeOD(OrderDetail o){
        if (this.listOrderDetail.contains(o)){
            this.listOrderDetail.remove(o);
            return true;
        } else return false;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public int getOrderID() {
        return orderID;
    }

    public void setOrderID(int orderID) {
        this.orderID = orderID;
    }

    public String getPersonName() {
        return personName;
    }

    public void setPersonName(String personName) {
        this.personName = personName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public long getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(long totalPrice) {
        this.totalPrice = totalPrice;
    }

    public long getTotalProduct() {
        return totalProduct;
    }

    public void setTotalProduct(long totalProduct) {
        this.totalProduct = totalProduct;
    }

    public int getUserID() {
        return userID;
    }

    public void setUserID(int userID) {
        this.userID = userID;
    }



}
